﻿namespace DFGK_WMS.Common
{
    public static class BaseResult
    {
        public static ApiResult Result(object data, string message, string code, int count = 0)
        {
            ApiResult result = new ApiResult();
            result.code = code;
            result.message = message;
            result.data = data;
            result.count = count;
            return result;
        }
        public static ApiResult Result(object data, string code, int count)
        {
            ApiResult result = new ApiResult();
            result.code = code;
            result.data = data;
            result.count = count;
            return result;
        }
        public static ApiResult Result(object data, string code)
        {
            ApiResult result = new ApiResult();
            result.code = code;
            result.data = data;
            return result;
        }
        public static ApiResult Result(string code, string message)
        {
            ApiResult result = new ApiResult();
            result.code = code;
            result.message = message;
            return result;
        }
    }
}
